<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>商品详情</title>
<link rel="stylesheet" href="css/minute.css">
</head>
<body>
	<div id="box">
		<div id="nav">
			<div class="nav_left">
				<img src="images/shouye.webp" class="shouyeImg">
				<a href="index.jsp">天猫首页</a>&nbsp;&nbsp;
				<span>喵，欢迎来天猫</span>&nbsp;&nbsp;
				<a href="login.jsp">请登录</a>&nbsp;&nbsp;
				<a href="register.jsp">免费注册</a>  
			</div>
			<div class="nav_right">
				<div class="myshow1">
					<a href="#" class="mymove1">我的淘宝</a>&nbsp;&nbsp;
					<div id="mytaobao">
						<a href="#">已买到的宝贝</a><br>
						<a href="#">已卖出的宝贝</a>
					</div>
				</div>
				<img src="images/car.png">
				<a href="shopcar.jsp">购物车</a>&nbsp;&nbsp; 	
				<div class="myshow2">
					<a href="collect.do" class="mymove2">收藏夹</a>&nbsp;&nbsp;|&nbsp;&nbsp;	
					<div id="shoucangjia">
						<a href="#">收藏的宝贝</a><br>
						<a href="#">收藏的店铺</a>
					</div>
				</div>
				<img src="images/nav9.png" alt="" class="myphon">
				<div class="myshow3">
					<a href="" class="mymove3">手机版</a>&nbsp;&nbsp;
					<div id="myshoujiban">
						<img src="images/TB14.png" alt="">
					</div>
				</div>
				<a href="https://www.taobao.com/">淘宝网</a>&nbsp;&nbsp;
				<a href="">网页无障碍</a>&nbsp;&nbsp;
				<a href="">商家支持</a>
			</div>
		</div>
		<div id="header">
			<a href="index.jsp"><img src="images/tmallLogo.png" alt=""></a>
			<form action="search.html" method="get">
				<input type="text" name="keyword" placeholder="搜索 天猫 商品/品牌/店铺">
				<input type="submit" value="搜索">
			</form>
		</div>
		
		<div id="boxTbody">
			<div id="tbody">
				<div class="top">
					<img src="images/2.jpg" alt="">
				</div>
				<div class="center">
					<div class="center_left">
						
					</div>
					<div class="center_right">
						<h4></h4>
						<p>月销：</p>
						<div class="div1">
							<div class="div2">聚划算</div>
							<div class="price"></div>
						</div>
						<form action="">
							<table>
								<tr>
									<td>配送：</td>
									<td class="address"></td>
									<td></td>
								</tr>
								<tr>
									<td>尺码：</td>
									<td>
										<span>S</span>
										<span>M</span>
										<span>L</span>
									</td>
									<td></td>
								</tr>
								<tr>
									<td>数量：</td>
									<td>
										<span>-</span>
										<span>1</span>
										<span>+</span>
										有货
									</td>
									<td></td>
								</tr>
							</table>
							<input type="submit" value="立即购买" class="buy">
							<input type="submit" value="加入购物车" class="shopcar">
							<a href="#" id="collect">收藏</a>
						</form>
					</div>
				</div>
			</div>
			
		</div>
		

		<div id="myfooter">
		<div class="footer_footer">
				<a href="#">关于天猫</a>
				<a href="#">商家服务大厅</a>
				<a href="#">开放平台</a>
				<a href="#">诚聘英才</a>
				<a href="#">联系我们</a>
				<a href="#">网站合作</a>
				<a href="#">法律声明</a>
				<a href="#">隐私权政策</a>
				<a href="#">知识产权</a>
				<a href="#">廉正举报</a>
				<a href="#">不当竞争举报</a><br>
				<a href="#">阿里巴巴集团</a>
				<a href="#">&nbsp;|&nbsp;淘宝网</a>
				<a href="#">&nbsp;|&nbsp;天猫</a>
				<a href="#">&nbsp;|&nbsp;聚划算</a>
				<a href="#">&nbsp;|&nbsp;全球速卖通</a>
				<a href="#">&nbsp;|&nbsp;阿里巴巴国际交易市场</a>
				<a href="#">&nbsp;|&nbsp;1688</a>
				<a href="#">&nbsp;|&nbsp;阿里妈妈</a>
				<a href="#">&nbsp;|&nbsp;飞猪</a>
				<a href="#">&nbsp;|&nbsp;阿里云计算</a>
				<a href="#">&nbsp;|&nbsp;AliOS</a>
				<a href="#">&nbsp;|&nbsp;阿里通信</a>
				<a href="#">&nbsp;|&nbsp;万网</a>
				<a href="#">&nbsp;|&nbsp;高德</a>
				<a href="#">&nbsp;|&nbsp;UC</a>
				<a href="#">&nbsp;|&nbsp;友盟</a>
				<a href="#">&nbsp;|&nbsp;虾米</a>
				<a href="#">&nbsp;|&nbsp;钉钉</a>
				<a href="#">&nbsp;|&nbsp;支付宝</a>
				<a href="#">&nbsp;|&nbsp;阿里安全</a><br>
				
				<span>
					增值电信业务经营许可证：浙B2-20110446&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;市场名称登记证：工商网市字3301004119号 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;出版物网络交易平台服务经营备案证： 新出发浙备字第2019002号
				</span><br>
				<span>
					互联网违法和不良信息举报电话：0571-81683755 blxxjb@alibaba-inc.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;互联网药品信息服务资质证书编号：浙-（经营性）-2017-0005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/TB1yEqRPXXXXXXPXpXXXXXXXXXX-20-20.png" alt="">浙公网安备 33010002000120号
				</span><br>
				<span>
					医疗器械网络交易服务第三方平台备案：（浙）网械平台备字[2018]第00002号&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 网络文化经营许可证：浙网文 [2021]1668-073号&nbsp;<img src="images/O1CN01VEHhJi1T2RCHFYS81_!!6000000002324-1-tps-65-70.gif" alt="" class="myFooterImg">
				</span><br>
				<span>浙江省网络食品销售第三方平台提供者备案：浙网食A33010002&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;12318举报&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;浙B2-20110446-1</span><br>
				<span>&copy;2003-现在 TMALL.COM 版权所有</span><br>
				<div class="myFooterImg2">
					<img src="images/O1CN01Hs1MVu1IDvM07YrGh_!!6000000000860-2-tps-293-143.png" alt="">
				</div>
				
			</div>
	</div>


	</div>
<c:if test="${!empty loginUser.userId}">
	<input id="userId" value="${loginUser.userId}" type="hidden">
</c:if>
<input id="gId" name="goodsId" value="${param.gId}" type="hidden">
</body>
<script src="js/jquery.min.js"></script>
<script>
load();

	var userId = $("#userId").val();
	function addGoodsInCar(thisId){
		$.ajax({
			url:"/shopping/addGoodsGoShopCar.do",
			type:"GET",
			data:{
				"gId":thisId,
				"userId":userId
			},
			success:function(data){
				
			}
		});
		
	}

	
	
	function load(){
		var gId = $("#gId").val();
		var userId = $("#userId").val();
		$.ajax({
			url:"/shopping/minute.do",
			type:"GET",
			data:{
				"gId":gId
			},
			success:function(data){
				var $img = $("<img class='goods_image'>").attr({src:data.gImage,alt:"图片走丢了"}).height(300).width(300);
				$(".center_left").append($img);
				$(".center_right").children("h4").text(data.gName);
				var $num = $("<lable>"+data.gNum+"</lable>");
				$(".center_right").children("p").append($num);
				$(".price").append("￥"+data.gPrice);
			}
		});
		
		if(userId == null){
			var $a = $("<a>请登录……</a>");
			$(".address").append($a);
		}else{
			$.ajax({
				url:"/shopping/user.do",
				type:"GET",
				data:{
					"gId":thisId,
					"userId":userId
				},
				success:function(data){
					
				}
			});
		}
		
	}
</script>
</html>